成功解决:Caused by: ParsingException[Failed to parse object: expecting token of type [START |
您所在的位置:网站首页 › parse attempt failed for value › 成功解决:Caused by: ParsingException[Failed to parse object: expecting token of type [START |
成功解决:Caused by: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but
精选 原创
小兔教你学编程 2023-03-19 07:46:22 ©著作权 文章标签 elasticsearch 搜索引擎 java Elastic 文章分类 Python 后端开发 ©著作权归作者所有:来自51CTO博客作者小兔教你学编程的原创作品,请联系作者获取转载授权,否则将追究法律责任前言 在根据镜像elasticsearch创建容器的时候,启动容器失败。 查看报错日志查看日志 这里查看相关容器启动失败日志 docker logs e09[root@localhost elasticsearch]# docker logs e09Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]]; at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1189) at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1160) at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:75) at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:91) at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:82) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) at org.elasticsearch.cli.Command.main(Command.java:77) at org.elasticsearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:33)Caused by: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]] at org.elasticsearch.common.xcontent.XContentParserUtils.parsingException(XContentParserUtils.java:77) at org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:70) at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:672) at org.elasticsearch.common.settings.Settings.access$400(Settings.java:75) at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1185) ... 10 moreException in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]]; at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1189) at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1160) at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:75) at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:91) at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:82) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) at org.elasticsearch.cli.Command.main(Command.java:77) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)Caused by: ParsingException[Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]] at org.elasticsearch.common.xcontent.XContentParserUtils.parsingException(XContentParserUtils.java:77) at org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:70) at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:672) at org.elasticsearch.common.settings.Settings.access$400(Settings.java:75) at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1185) ... 9 more排查问题是说在启动时在解析elasticsearch.yml出现错误,查看自己外部挂载的elasticsearch.yml配置文件(如没有挂载配置文件,则需去容器内查找) /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \-v /mydata/elasticsearch/dada:/usr/share/elasticsearch/dada \-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \-d elasticsearch:7.17.2解决方法修改 elasticsearch.yml中的配置。空格要特别注意 启动成功重新启动容器 docker start e09e7a49ae97资料参考:原因+解决方法 赞 收藏 评论 分享 举报 上一篇:一文教会你如何简单使用Fegin进行远程服务调用 下一篇:一文教会你如何通过Docker安装elasticsearch和kibana 【详细过程+图解】 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |